home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / examples / demo / demosrc / sizetips.pro < prev    next >
Text File  |  1997-07-08  |  773b  |  27 lines

  1. ;------------------------------------------------
  2. ;
  3. ;    PURPOSE  Size the tip widget to be half of
  4. ;             the top level base width and map
  5. ;             the base that contains the tip widgets.
  6. ;
  7. pro sizeTips, $
  8.     wTopBase, $    ; IN: top level base
  9.     wText, $       ; IN: ID of the 2 tip text widgets
  10.     wTipBase       ; IN: base of the 2 tip widgets.
  11.  
  12.     ;  Get the x size of the top level base.
  13.     ;
  14.     tlbGeometry = WIDGET_INFO(wTopBase, /GEOMETRY)
  15.     tlbXSize = tlbGeometry.xsize + (2 * tlbGeometry.margin)
  16.  
  17.     ;  Size the tip widgets.
  18.     ;
  19.     WIDGET_CONTROL, wText[0], SCR_XSIZE = tlbXSize/2 - 5
  20.     WIDGET_CONTROL, wText[1], SCR_XSIZE = tlbXSize/2 - 5
  21.  
  22.     ;  Map the tip widgets.
  23.     ;
  24.     WIDGET_CONTROL, wTipBase, MAP=1
  25.  
  26. end    ;  of sizeTips
  27.